package com.zqu.service.impl;

import com.zqu.mapper.PManagerment.InsuranceMapper;
import com.zqu.mapper.PManagerment.InsuranceOrderMapper;
import com.zqu.pojo.InsuranceOrder;
import com.zqu.service.InsuranceOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InsuranceOrderServiceImpl implements InsuranceOrderService {

    @Autowired(required = false)
    private InsuranceOrderMapper insuranceOrderMapper;

    @Override
    public InsuranceOrder selectInsuranceOrderById(long id) {
        return insuranceOrderMapper.selectTById(id);
    }

    @Override
    public List<InsuranceOrder> selectList(InsuranceOrder insuranceOrder) {
        return insuranceOrderMapper.selectList(insuranceOrder);
    }

    @Override
    public boolean insertInsuranceOrder(InsuranceOrder insuranceOrder) {
        return insuranceOrderMapper.insertT(insuranceOrder)>0;
    }

    @Override
    public boolean updateInsuranceOrder(InsuranceOrder insuranceOrder) {
        return insuranceOrderMapper.updateT(insuranceOrder)>0;
    }

    @Override
    public boolean deleteInsuranceOrder(long id) {
        return insuranceOrderMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteInsuranceOrderByIds(String[] ids) {
        return insuranceOrderMapper.deleteTByIds(ids)>0;
    }
}
